
import { useLayoutStore } from '@/store/layout'
import { hljsVuePlugin, loadHighlightTheme } from './highlight'

export const setupHighlight = (app: any) => {
  // 注册highlight.js插件
  app.use(hljsVuePlugin)

  // 初始化主题
  const initHighlightTheme = async () => {
    const layoutStore = useLayoutStore()
    await loadHighlightTheme(layoutStore.theme)
  }
  initHighlightTheme()
}